{% extends "base.html" %}
{% load markup %}
{% load paginator %}
{% block meta %}
<meta name="keyword" content="python, onlypython, 新闻, 技术文章, 八卦, 项目介绍">
<meta name="description" content="OnlyPython是一个以Python为主题的博客网站。">
{% endblock %}
{% block content %}
{% for post in object_list %}
{% block navigator %}{% endblock %}
<table border="0" cellspacing="0" cellpadding="0" width="100%">
    <tr>
        <td valign="top">
            <h1 style="margin-bottom: 2px;"><a href="/post/{{post.key.id}}">[{{ post.category.name }}] {{ post.title }}{% if post.is_published %}{%else%}(未发布){%endif%}</a></h1>
        </td>
    </tr>
</table>
<div style="padding-left: 30px;">
    {{ post.content|markdown }}
</div>
<div class="post_footer">
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
            <td align="left" class="small_font">
                <span>
                    {{ post.author.nickname }} | {{ post.create_time|date:"Y/m/d H:i" }}
                </span> | 
                <span>
                    类别: <a href="/category/{{ post.category.key.id }}/">{{ post.category.name }}</a>
                </span> | 
                {% if is_admin %}<a href="/post/{{ post.key.id }}/delete/">删除</a>{% endif %}
                {% if is_admin %}<a href="/post/{{ post.key.id }}/edit/">修改</a>  {% endif %} 
                <span>
                    <a href="/post/{{ post.key.id }}/#comment">评论({{ post.comment_count }})</a>
                </span> | 
                <span>
                    阅读({{ post.read_count }})
                </span>
            </td>
        </tr>
    </table>
</div>
{% endfor %}
{% paginator %}
{% endblock %}
